package com.aurora.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aurora.blog.mapper.BlogCommentsMapper;
import com.aurora.blog.domain.BlogComments;
import com.aurora.blog.service.IBlogCommentsService;

/**
 * 评论Service业务层处理
 * 
 * @author aurora
 * @date 2024-06-04
 */
@Service
public class BlogCommentsServiceImpl implements IBlogCommentsService 
{
    @Autowired
    private BlogCommentsMapper blogCommentsMapper;

    /**
     * 查询评论
     * 
     * @param commentId 评论主键
     * @return 评论
     */
    @Override
    public BlogComments selectBlogCommentsByCommentId(Long commentId)
    {
        return blogCommentsMapper.selectBlogCommentsByCommentId(commentId);
    }

    /**
     * 查询评论列表
     * 
     * @param blogComments 评论
     * @return 评论
     */
    @Override
    public List<BlogComments> selectBlogCommentsList(BlogComments blogComments)
    {
        return blogCommentsMapper.selectBlogCommentsList(blogComments);
    }

    /**
     * 新增评论
     * 
     * @param blogComments 评论
     * @return 结果
     */
    @Override
    public int insertBlogComments(BlogComments blogComments)
    {
        return blogCommentsMapper.insertBlogComments(blogComments);
    }

    /**
     * 修改评论
     * 
     * @param blogComments 评论
     * @return 结果
     */
    @Override
    public int updateBlogComments(BlogComments blogComments)
    {
        return blogCommentsMapper.updateBlogComments(blogComments);
    }

    /**
     * 批量删除评论
     * 
     * @param commentIds 需要删除的评论主键
     * @return 结果
     */
    @Override
    public int deleteBlogCommentsByCommentIds(Long[] commentIds)
    {
        return blogCommentsMapper.deleteBlogCommentsByCommentIds(commentIds);
    }

    /**
     * 删除评论信息
     * 
     * @param commentId 评论主键
     * @return 结果
     */
    @Override
    public int deleteBlogCommentsByCommentId(Long commentId)
    {
        return blogCommentsMapper.deleteBlogCommentsByCommentId(commentId);
    }
}
